package com.hsj.goldstore.utils.retrofit;


import com.hsj.goldstore.base.BaseBean;
import com.hsj.goldstore.bean.LoginBean;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * Created by Administrator on 2018/3/22.
 */

public interface ApiStore {

    /**
     * 服务端地址
     */
    public static final String BASE_URL = "http://netbox.ngrok.xiaomiqiu.cn/";

    /**
     * @return token 检查接口
     */
    @FormUrlEncoded
    @POST("token")
    Observable<BaseBean> tokenCheck();

    /**
     * @param map
     * @return 登录
     */
    @FormUrlEncoded
    @POST("sys/appuser/v1/token")
    Observable<BaseBean<LoginBean>> login(@FieldMap Map<String, Object> map);


    /**
     * @param map
     * @return 注册
     */
    @FormUrlEncoded
    @POST("sys/appuser/v1/register")
    Observable<BaseBean> regist(@FieldMap Map<String,String> map);


}
